<template>
  <el-dialog title="提示"
   append-to-body="true"
   :visible.sync="visibleDialog" 
   class="tips-box">
    <div class="ant-confirm-body">
      <i class="anticon anticon-close-circle" style="color: #f00"></i>
      <span class="ant-confirm-title">当前无法发布</span>
      <div class="ant-confirm-content">
        <div>
          <p class="error-modal-desc">以下内容不完善，需进行修改</p>
          <div class="error-modal-list">
            <div
              class="error-modal-item"
              v-for="(item, index) in list"
              :key="index"
            >
              <div class="error-modal-item-label">流程设计</div>
              <div class="error-modal-item-content">
                {{ item.name }} 未选择{{ item.type }}
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <span slot="footer" class="dialog-footer">
      <el-button @click="visibleDialog = false">我知道了</el-button>
      <el-button type="primary" @click="visibleDialog = false"
        >前往修改</el-button
      >
    </span>
  </el-dialog>
</template>

<script>
export default {
  props: ["list", "visible"],
  data() {
    return {
      visibleDialog: false,
    };
  },
  watch: {
    visible(val) {
      this.visibleDialog = val;
    },
    visibleDialog(val) {
      this.$emit("update:visible", val);
    },
  },
};
</script>

<style scoped lang="scss">
.tips-box {
  .ant-confirm-body {
    .anticon-close-circle {
      font-size: 22px;
      margin-right: 16px;
      float: left;
    }
    .ant-confirm-title {
      color: rgba(0, 0, 0, 0.85);
      font-weight: 500;
      font-size: 16px;
      line-height: 1.4;
      display: block;
      overflow: hidden;
    }
    .ant-confirm-content {
      margin-left: 38px;
      font-size: 14px;
      color: rgba(0, 0, 0, 0.65);
      margin-top: 8px;
      .error-modal-desc {
        font-size: 13px;
        color: rgba(25, 31, 37, 0.56);
        line-height: 22px;
        margin-bottom: 14px;
      }
      .error-modal-list {
        .error-modal-item {
          padding: 10px 20px;
          line-height: 21px;
          background: #f6f6f6;
          display: -webkit-box;
          display: -ms-flexbox;
          display: flex;
          -webkit-box-pack: justify;
          -ms-flex-pack: justify;
          justify-content: space-between;
          -webkit-box-align: center;
          -ms-flex-align: center;
          align-items: center;
          margin-bottom: 8px;
          border-radius: 4px;
          .error-modal-item-label {
            -webkit-box-flex: 0;
            -ms-flex: none;
            flex: none;
            font-size: 15px;
            color: rgba(25, 31, 37, 0.56);
            padding-right: 10px;
          }
          .error-modal-item-content {
            text-align: right;
            -webkit-box-flex: 1;
            -ms-flex: 1;
            flex: 1;
            font-size: 13px;
            color: #191f25;
          }
        }
      }
    }
  }
}
</style>